/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.crm.sopm.session;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.ejb.Remote;
import javax.persistence.EntityManager;
import merlion.common.util.exception.NotExistException;
import merlion.crm.sopm.entity.PurchaseOrder;
import merlion.crm.sopm.entity.RequestForQuotation;
import merlion.crm.sopm.entity.SalesInquiry;
import merlion.crm.sopm.entity.SalesOrder;
import merlion.crm.sopm.entity.SalesQuotation;
import merlion.mrp.ppm.entity.Product;

/**
 *
 * @author zhiqi chen
 */
@Remote
public interface SOPSessionBeanRemote {

    void cancelSalesOrder(String idStr);

    void createSalesOrder(PurchaseOrder purchaseOrder);

    String generateSalesInquiryId();

    String generateSalesOrderId();

    String generateSalesQuotationId();

    List<PurchaseOrder> getAllPurchaseOrders();

    List<RequestForQuotation> getAllRequestForQuotation();

    List<SalesInquiry> getAllSalesInquirys();

    List<SalesOrder> getAllSalesOrders();

    List<SalesQuotation> getAllSalesQuotation();

    List<SalesQuotation> getAllSalesQuotations();

    EntityManager getEntityManager();

    ArrayList<Product> getProducts();

    PurchaseOrder getPurchaseOrderById(String idStr) throws NotExistException;

    RequestForQuotation getRequestForQuotationById(String idStr) throws NotExistException;

    HashMap getSalesFiguireLstOfLst(int numOfYears);

    SalesInquiry getSalesInquiryById(String idStr) throws NotExistException;

    SalesOrder getSalesOrderById(String idStr) throws NotExistException;

    SalesQuotation getSalesQuotationById(String idStr) throws NotExistException;

    HashMap getSalesRevenueFiguresLstOfLst(int numOfYears);

    String saveChangedSalesOrder(SalesOrder so);

    PurchaseOrder savePurchaseOrder(PurchaseOrder purchaseOrder);

    RequestForQuotation saveRequestForQuotation(RequestForQuotation requestForQuotation);

    SalesInquiry saveSalesInquiry(SalesInquiry sl);

    SalesOrder saveSalesOrder(SalesOrder salesOrder);

    SalesQuotation saveSalesQuotation(SalesQuotation sq);

    void setEntityManager(EntityManager entityManager);

    void updateSalesOrder(SalesOrder salesOrder);

    ArrayList<SalesOrder> viewHistoricalSalesOrder();

    PurchaseOrder viewPurchaseOrder(Long id) throws Exception;
    
}
